{% macro quick_pagination(pagination, endpoint, fragment='') %}
    <nav class="pagination-nav">
        <ul class="pagination">
            <li {% if not pagination.has_prev %} class="disabled"{% endif %}>
                <a href="{% if pagination.has_prev %}{{ url_for(endpoint, page=pagination.prev_num, **kwargs) }}{{ fragment }}{% else %}#{% endif %}">&laquo;</a>
            </li>
            {% for p in pagination.iter_pages() %}
                {% if p %}
                    <li {% if p == pagination.page %}class="active"{% endif %}>
                        <a href="{{ url_for(endpoint, page = p, **kwargs) }}{{ fragment }}">{{ p }}</a>
                    </li>
                {% else %}
                    <li class="disabled">
                        <a href="#">&hellip;</a>
                    </li>
                {% endif %}
            {% endfor %}
            <li {% if not pagination.has_next %} class="disabled"{% endif %}>
                <a href="{% if pagination.has_next %}{{ url_for(endpoint, page=pagination.next_num, **kwargs) }}{{ fragment }}{% else %}#{% endif %}">&raquo;</a>
            </li>
        </ul>
    </nav>
{% endmacro %}